package com.wpp;

import org.junit.Test;

import java.util.Arrays;

public class StringTest {
    public String str1="abc";

    public String test6(String str){
        System.out.println(str1==str);
        str="fcc";

        return str;
    }

    /**
    *用于测试:
    *
    */
    @Test
    public void test8(){
        String str2=str1;
        StringTest stringTest = new StringTest();
        stringTest.test6(str1);
        System.out.println(str1);
        System.out.println(str2);

    }




    @Test
    public void test() {
        java.lang.String s1 = "13abc";
        byte[] bytes = s1.getBytes();

        System.out.println(Arrays.toString(bytes));
        String string = new String(bytes);
        System.out.println(string);
    }

    @Test
    public void test1() {
        java.lang.String s1 = "13abc";
        byte[] bytes = s1.getBytes();
        System.out.println(Arrays.toString(bytes));
        String string = new String(bytes);
        System.out.println(string);
    }

    /**
    *用于测试:
    *
    */
    @Test
    public void test5(){
        String str1="abc";
        String str2="abc";


        str2="e"+"ff";




        System.out.println(str1==str2);
        System.out.println(str2);
    }



}
